# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer")

package(default_visibility = ["//src:__subpackages__"])

filegroup(
    name = "proc_fs",
    srcs = glob(include = ["proc/**/*"]),
)

filegroup(
    name = "kernel_version",
    srcs = glob([
        "sample_host_ubuntu/**/*",
        "sample_host_debian/**/*",
    ]),
)

# For scoped_namespace_test: Generate a container with a dummy file inside,
# so we can check for mount namespaces.
genrule(
    name = "empty_file_rule",
    srcs = [],
    outs = ["empty_file"],
    cmd = "touch $@",
)

container_layer(
    name = "empty_file_layer",
    directory = "/files_dir",
    files = [":empty_file_rule"],
)

container_image(
    name = "test_container_image",
    base = "//src/common/testing/test_utils:sleep_container_image",
    layers = [":empty_file_layer"],
)
